import sys

import pygame

pygame.init()

window_size = [800, 600]

window = pygame.display.set_mode(window_size)

clock = pygame.time.Clock()

t = 0

while True:
    tick = clock.tick(60)
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            sys.exit()
    t += tick

    if t >= 3000:
        window_size = [100, 100]
        window = pygame.display.set_mode(window_size)
    pygame.display.update()
